package com.frxuexi.mysign.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.lib_base.entity.StatusBean
import com.frxuexi.mysign.R

class SignStatusAdapter:BaseQuickAdapter<StatusBean,BaseViewHolder>(R.layout.item_signstatus) {
    override fun convert(helper: BaseViewHolder, item: StatusBean) {
        helper.getView<TextView>(R.id.status_sign).apply {
            setText(item.status)
            if(item.isCheck){
                setBackgroundResource(com.frxuexi.lib_base.R.drawable.shape_solid_blue)
                setTextColor(context.getColor(R.color.white))
            }else{
                setBackgroundResource(com.frxuexi.lib_base.R.drawable.shape_solid_lightgray)
                setTextColor(context.getColor(com.frxuexi.lib_base.R.color.darkgray))
            }
        }
    }
}